﻿using System.Windows;
using System.Windows.Input;

namespace MDCAdminTool.Commands
{
    public class RemoveCacheHost : AsyncCommandBindingBase
    {
        public RemoveCacheHost()
            : base()
        {
            Command = Application.Current.Resources["RemoveCacheHost"] as ICommand;
        }

        protected override void OnExecuted( object sender , ExecutedRoutedEventArgs e )
        {
            var host = e.Parameter as CacheHost;
            if ( host != null )
            {
                host.Stop();
                MessageBox.Show( " TODO:// :-)" );
            }
        }
        protected override void OnCanExecute( object sender , CanExecuteRoutedEventArgs e )
        {
            e.CanExecute = true;
        }
    }
}